<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "https://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="Content-Language" content="zh-CN"><link href="stylesheet.css" media="all" rel="stylesheet" type="text/css">
<title>备份与恢复</title>
<script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?d286c55b63a3c54a1e43d10d4c203e75"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script>
</head><body class="CHAPTER">
<div>
<table summary="Header navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><th colspan="5" align="center" valign="bottom">PostgreSQL 8.2.3 中文文档</th></tr>
<tr><td width="10%" align="left" valign="top"><a href="logfile-maintenance.html" accesskey="P">后退</a></td><td width="10%" align="left" valign="top"><a href="maintenance.html">快退</a></td><td width="60%" align="center" valign="bottom"></td><td width="10%" align="right" valign="top"><a href="high-availability.html">快进</a></td><td width="10%" align="right" valign="top"><a href="backup-dump.html" accesskey="N">前进</a></td></tr>
</table>
<hr align="LEFT" width="100%"></div>
<div class="CHAPTER"><h1><a name="BACKUP"></a>章23. 备份与恢复</h1>
<div>
<dl>
<dt><b>目录</b></dt>
<dt>23.1. <a href="backup-dump.html">SQL 转储</a></dt>
<dd><dl>
<dt>23.1.1. <a href="backup-dump.html#BACKUP-DUMP-RESTORE">从转储中恢复</a></dt>
<dt>23.1.2. <a href="backup-dump.html#BACKUP-DUMP-ALL">使用 <span class="APPLICATION">pg_dumpall</span></a></dt>
<dt>23.1.3. <a href="backup-dump.html#BACKUP-DUMP-LARGE">处理大数据库</a></dt>
</dl></dd>
<dt>23.2. <a href="backup-file.html">文件系统级别的备份</a></dt>
<dt>23.3. <a href="continuous-archiving.html">在线备份以及即时恢复(PITR)</a></dt>
<dd><dl>
<dt>23.3.1. <a href="continuous-archiving.html#BACKUP-ARCHIVING-WAL">设置 WAL 归档</a></dt>
<dt>23.3.2. <a href="continuous-archiving.html#BACKUP-BASE-BACKUP">进行一次基础备份</a></dt>
<dt>23.3.3. <a href="continuous-archiving.html#BACKUP-PITR-RECOVERY">从在线备份中恢复</a></dt>
<dt>23.3.4. <a href="continuous-archiving.html#BACKUP-TIMELINES">时间线</a></dt>
<dt>23.3.5. <a href="continuous-archiving.html#CONTINUOUS-ARCHIVING-CAVEATS">警告</a></dt>
</dl></dd>
<dt>23.4. <a href="warm-standby.html">高可用性热备份服务器</a></dt>
<dd><dl>
<dt>23.4.1. <a href="warm-standby.html#WARM-STANDBY-PLANNING">规划</a></dt>
<dt>23.4.2. <a href="warm-standby.html#WARM-STANDBY-CONFIG">实现</a></dt>
<dt>23.4.3. <a href="warm-standby.html#WARM-STANDBY-FAILOVER">失效切换</a></dt>
<dt>23.4.4. <a href="warm-standby.html#WARM-STANDBY-RECORD">基于记录的日志传送</a></dt>
<dt>23.4.5. <a href="warm-standby.html#BACKUP-INCREMENTAL-UPDATED">增量更新备份</a></dt>
</dl></dd>
<dt>23.5. <a href="migration.html">在不同版本之间迁移</a></dt>
</dl>
</div>
<a name="AEN24805"></a>
<p>和任何包含珍贵数据的东西一样，PostgreSQL 数据库也应该经常备份。尽管这个过程相当简单，但是我们还是应该理解做这件事所用的一些技巧和假设。</p>
<p>备份 PostgreSQL 数据有三种完全不同的方法：</p>
<ul>
<li><p>SQL 转储</p></li>
<li><p>文件系统级别备份</p></li>
<li><p>在线备份</p></li>
</ul>
<p>每种备份都有自己的优点和缺点。</p>
</div>
<div>
<hr align="LEFT" width="100%">
<table summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td width="33%" align="left" valign="top"><a href="logfile-maintenance.html" accesskey="P">后退</a></td><td width="34%" align="center" valign="top"><a href="index.html" accesskey="H">首页</a></td><td width="33%" align="right" valign="top"><a href="backup-dump.html" accesskey="N">前进</a></td></tr>
<tr><td width="33%" align="left" valign="top">日志文件维护</td><td width="34%" align="center" valign="top"><a href="admin.html" accesskey="U">上一级</a></td><td width="33%" align="right" valign="top">SQL 转储</td></tr>
</table>
</div>
</body></html>